package com.may.wind.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 文章
 */
@Entity
@Table(name = "articles")
@JsonIgnoreProperties({"handler","hibernateLazyInitializer"})
@ApiModel(description = "文章")
public class Article implements Serializable {
    @Id
    @SequenceGenerator(sequenceName = "article_sequence", name = "sequence_articles", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence_articles")
    @Column(name = "id")
    @ApiModelProperty(name = "id", value = "ID", required = true)
    long id;

    @ApiModelProperty(name = "title", value = "标题")
    String title;

    @ApiModelProperty(name = "html", value = "HTML")
    String html;

    @ApiModelProperty(name = "mark", value = "标记")
    String mark;

    @ApiModelProperty(name = "abs", value = "描述")
    String abs;

    @ApiModelProperty(name = "cover", value = "封面")
    String cover;

    @ApiModelProperty(name = "date", value = "时间")
    Date date;

    public long getId() {
        return id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getHtml() {
        return html;
    }

    public void setHtml(String html) {
        this.html = html;
    }

    public String getMark() {
        return mark;
    }

    public void setMark(String mark) {
        this.mark = mark;
    }

    public String getAbs() {
        return abs;
    }

    public void setAbs(String abs) {
        this.abs = abs;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }
}
